Repository navigation
fix: bump goja to pick up its own upstream fix for engine#418 - #446
Merged
Merged
Conversation
Round 48's investigation found and reproduced the goja compiler bug behind engine#418 (every localized string on github.com's own Support app rendering as i18next's literal "returned an object instead of string" fallback) in isolation: a function with one declared parameter that reads arguments[N] for N>=1, with a nested non-arrow closure capturing another local variable, corrupts that variable's storage. A priorart search against dop251/goja's own tracker (before concluding no engine-level fix was possible, per this fleet's own bibliography-first rule) found this is already fixed upstream: dop251/goja#862, "Fixed extra arguments overwriting variables in the stash when arguments are copied to it", merged 2026-11-10 into 844f1a0e4767 - a month after this repo's pinned goja commit (2026-09-26). Verified directly: the exact real resolve() function body, run standalone against the bumped goja, now produces the correct value on every one of the cases that were wrong before (both the real i18next shape and a from-scratch generic repro, at 1/2/3 levels of closure nesting). Re-rendered the real support.github.com page end to end: every string now renders correctly ("Help", "Sign in with GitHub", "New to GitHub? Create an account", ...), zero instances of the fallback text, confirmed visually against the rendered PNG. go test ./... and govulncheck ./... clean. go test ./... -race shows two pre-existing, unrelated flakes in js/worker_test.go (a shared-variable race between the test's own goroutines, nothing to do with goja or this fix) - confirmed to reproduce identically on unmodified main before this change, out of this PR's scope. Co-Authored-By: Claude Sonnet 5 <[email protected]>
bench is a separate nested module (its own go.mod) that also carries goja as an indirect dependency; go mod tidy at the repo root does not enter it, so it needed its own tidy pass to match the previous commit's root-level bump. Co-Authored-By: Claude Sonnet 5 <[email protected]>
tannevaled
force-pushed
the
fix-engine418-goja-dependency-bump
branch
from
November 21, 2026 20:05
eb72ba9 to
7e12e32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rendering as i18next's literal
key 'X (en)' returned an object instead of string.fallback. Round 48 found and reproduced the real cause inisolation: a goja compiler bug (a function with one declared parameter
reading
arguments[N],N>=1, with a nested non-arrow closurecapturing another local variable, corrupts that variable's storage).
priorartsearch againstdop251/goja's own tracker found this isalready fixed upstream:
dop251/goja#862, merged 2026-11-10, a monthafter this repo's previously pinned commit. Bumping
go.mod'sgojadependency is the entire fix — no engine-level code change needed.
exact real
resolve()function body, run standalone against the bumpedgoja, now produces correct results on every case that was wrong before.
Re-rendered the real
support.github.compage end to end — everystring renders correctly, zero instances of the fallback text,
confirmed visually against the rendered output.
bench/'s own separate nested module also needed its owngo mod tidypass (its own commit) since the root module's tidy doesn't reach it.
See FIDELITY.md's own round 48/49 entries for the full investigation
trail.
Test plan
go build ./...,go vet ./...,gofmt -l .cleango test ./...cleangovulncheck ./...clean (0 vulnerabilities affecting this code)go test ./... -race: two pre-existing, unrelated flakes injs/worker_test.go(a synchronization gap between the test's owngoroutines) — confirmed to reproduce identically on unmodified
mainbefore this change, out of this PR's scopehttps://support.github.com/request/landingend toend and visually confirmed every string is correct
🤖 Generated with Claude Code